<template>
	<view class="content">
		<view class="logo">
			<image src="../../../static/images/logo.png" mode="scaleToFill"></image>
		</view>
		<view class="itemClass">
			<input type="number" placeholder="输入账号" v-model="ipone" class="mui-input-clear mui-input">
		</view>
		<!-- <input type="number" style="opacity: 0;position: absolute;transform: scale(0.1);"  /> -->
		<view class="itemClass">
			<input placeholder="输入密码" confirm-type="done" type="password" v-model="pasd" class="mui-input-clear mui-input">
		</view>
		<view class="register">
			<text>自动登录</text>
			<switch :checked="isChoose" type="checkbox" @change="isChooseTap" color="#4FA7E6"></switch>
		</view>

		<view class="mui-content-padded">
			<view @click="submit" class="login">登录</view>
			<view class="link-area">
				<navigator url="../Enroll/Enroll" hover-class="none">
					<text>注册账号</text>
				</navigator>
				<navigator url="../forget/forget" hover-class="none">
					<text>忘记密码</text>
				</navigator>
			</view>
		</view>
	</view>
</template>

<script>
	import { registerModel } from '../register.js'
	import util from '../../../common/js/util.js'
	const register = new registerModel()
	
	export default {
		data() {
			return {
				isChoose: true,
				ipone: '',
				pasd: '',
			}
		},
		onLoad: function() {
			//#ifdef APP-PLUS
			plus.webview.currentWebview().setStyle({
				softinputMode: "adjustResize"
			})
			//#endif
		},
		methods: {
			submit() {
				const Login = register.Login(this.ipone, this.pasd,this.isChoose)
			},
			isChooseTap(e) {
				this.isChoose = e.detail.value
			}
		}
	}
</script>

<style lang="scss">
	@import "../../../common/scss/reg.scss";
</style>
